<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
   <meta charset="utf-8" />
   <title>利导科技客户关系管理系统 | 共享客户</title>
   <meta http-equiv="X-UA-Compatible" content="IE=edge">
   <meta content="width=device-width, initial-scale=1.0" name="viewport" />
   <meta content="" name="description" />
   <meta content="" name="author" />
   <meta name="MobileOptimized" content="320">
   <!-- BEGIN GLOBAL MANDATORY STYLES -->          
   <link href="${base}/assets/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
   <link href="${base}/assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
   <link href="${base}/assets/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css"/>
   <!-- END GLOBAL MANDATORY STYLES -->
   <!-- BEGIN PAGE LEVEL STYLES -->
   <link rel="stylesheet" type="text/css" href="${base}/assets/plugins/select2/select2_metro.css" />
   <link rel="stylesheet" href="${base}/assets/plugins/data-tables/DT_bootstrap.css" />
   <link rel="stylesheet" type="text/css" href="${base}/assets/plugins/bootstrap-datepicker/css/datepicker.css">
   <link rel="stylesheet" type="text/css" href="${base}/assets/plugins/bootstrap-timepicker/compiled/timepicker.css">
   <link rel="stylesheet" type="text/css" href="${base}/assets/plugins/bootstrap-datetimepicker/css/datetimepicker.css">
   <!-- END PAGE LEVEL STYLES -->
   <!-- BEGIN THEME STYLES --> 
   <link href="${base}/assets/css/style-metronic.css" rel="stylesheet" type="text/css"/>
   <link href="${base}/assets/css/style.css" rel="stylesheet" type="text/css"/>
   <link href="${base}/assets/css/style-responsive.css" rel="stylesheet" type="text/css"/>
   <link href="${base}/assets/css/plugins.css" rel="stylesheet" type="text/css"/>
   <link href="${base}/assets/css/themes/default.css" rel="stylesheet" type="text/css" id="style_color"/>
   <link href="${base}/assets/css/custom.css" rel="stylesheet" type="text/css"/>
   <!-- END THEME STYLES -->
   <link rel="shortcut icon" href="${base}/assets/img/favicon.ico" />
</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class="page-header-fixed">
   <#include "header.ftl">
   <div class="clearfix"></div>
   <!-- BEGIN CONTAINER -->
   <div class="page-container">
      <!-- BEGIN SIDEBAR -->
      <#include "main_menu.ftl">
      <!-- END SIDEBAR -->
      <!-- BEGIN PAGE -->
      <div class="page-content">
      	<#include "changePassword.ftl">
         <#include "system-set.ftl">
         <#include "viewTracking.ftl">
         <!-- BEGIN SAMPLE PORTLET CONFIGURATION MODAL FORM-->
         <div class="modal" id="ViewContacts" tabindex="-1" role="basic" aria-hidden="true">
            <div class="modal-dialog modal-wide">
               <div class="modal-content">
                  <div class="modal-header">
                     <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                     <h4 class="modal-title">查看联系人</h4>
                  </div>
                  <div class="modal-body">
                  	<form id="form_contacts" class="form-horizontal">
                     <#include "viewContacts.ftl">
                    </form> 
                  </div>
                  <div class="modal-footer">
                     <button type="button" class="btn default" data-dismiss="modal">Close</button>
                  </div>
               </div>
               <!-- /.modal-content -->
            </div>
            <!-- /.modal-dialog -->
         </div>
         <!-- END SAMPLE PORTLET CONFIGURATION MODAL FORM-->
         <!-- BEGIN PAGE HEADER-->
         <div class="row">
            <div class="col-md-12">
               <!-- BEGIN PAGE TITLE & BREADCRUMB-->
			   <h3 class="page-title">
			   	共享客户<small>这里显示所有你共享给其他同事的客户信息和其他同事共享给你的客户信息</small>
			   </h3>
			   <ul class="page-breadcrumb breadcrumb">
			      <li>
			         <i class="icon-home"></i>
			         <a href="${base}/admin/admin!main.action">Home</a> 
			         <i class="icon-angle-right"></i>
			      </li>
			      <li>
			         <a href="#">Customer Management</a>
			         <i class="icon-angle-right"></i>
			      </li>
			      <li>
			      	<a href="${base}/admin/customer!myCustomer.action">共享客户</a>
			      	
			      </li>
			     
			   </ul>
			   <!-- END PAGE TITLE & BREADCRUMB-->
            </div>
         </div>
         <!-- END PAGE HEADER-->
         <!-- BEGIN PAGE CONTENT-->
         <div class="row">
            <div class="col-md-12">
            	 <div class="portlet box green">
                  <div class="portlet-title">
                     <div class="caption"><i class="icon-reorder"></i>共享客户</div>
                     <div class="actions">                     
                     	<div class="btn-group">
                           <a class="btn green" href="#" data-toggle="dropdown">
                           <i class="icon-cogs"></i> 菜单
                           <i class="icon-angle-down"></i>
                           </a>
                           <ul class="dropdown-menu pull-right">
                              <li><a href="javascript:;" id = "Deletes"><i class="icon-trash"></i> 取消共享</a></li>
                              <li class="divider"></li>
                              <li><a href="javascript:;" id = "Export"><i class="icon-signout"></i> 导出到Excel</a></li>
                              <li><a href="javascript:;" id = "Import"><i class="icon-signin"></i> 从Exce导入</a></li>
                           </ul>
                        </div>
                      </div>
                  </div>
                  <div class="portlet-body">
                     <ul  class="nav nav-tabs">
                        <li class="active"><a href="#tab_1_1" data-toggle="tab">我共享的客户</a></li>
                        <li class=""><a href="#tab_1_2" data-toggle="tab">共享给我的客户</a></li>
                     </ul>
                     <div  class="tab-content">
                        <div class="tab-pane fade active in" id="tab_1_1">
                        	<!-- 我共享的客户开始 -->
                           <div class="portlet-body">
			                 <table class="table table-striped table-bordered table-hover" id="customer">
			                    <thead>
			                       <tr>
			                          <th style="width:8px;"><input type="checkbox" class="group-checkable" data-set="#customer .checkboxes" /></th>
			                          <th class="hidden-480">客户编号</th>
			                          <th class="hidden-480">简称</th>
			                          <th class="hidden-480">当前阶段</th>
			                          <th class="hidden-480">客户种类</th>
			                          <th class="hidden-480">所有人</th>
			                          <th class="hidden-480">行业</th>
			                          <th class="hidden-480">省份</th>
			                          <th class="hidden-480">城市</th>
			                          <th class="hidden-480">主要联系人</th>
			                          <th class="hidden-480">操作</th>
			                       </tr>
			                    </thead>
			                    <tbody>
			                       <#if iSharedCustomerList?exists>
			                        	<#list iSharedCustomerList as customer>
				                           <tr class="odd gradeX">
				                              <td><input type="checkbox" class="checkboxes" value="${customer.id}" /></td>
				                              <td class="hidden-480"><#if customer.no?exists>${customer.no}</#if></td>
				                              <td class="hidden-480"><#if customer.shortName?exists><a href = "${base}/admin/customer!findById.action?customerId=${customer.id}">${customer.shortName}</a></#if></td>
				                              <td class="hidden-480"><#if customer.currentStep?exists>${customer.currentStep}</#if></td>
				                              <td class="hidden-480"><#if customer.catagory?exists>${customer.catagory}</#if></td>
				                              <td class="hidden-480"><#if customer.proprietor?exists>${customer.proprietor}</#if></td>
				                              <td class="hidden-480"><#if customer.trade?exists>${customer.trade}</#if></td>
				                              <td class="hidden-480"><#if customer.province?exists>${customer.province}</#if></td>
				                              <td class="hidden-480"><#if customer.city?exists>${customer.city}</#if></td>
				                              <td class="hidden-480"><#if customer.lxr?exists><a href = "javascript:;" onclick = "return viewContacts(${customer.lxrId});">${customer.lxr}</a></#if></td>
				                              <td class="hidden-480">
				                              	<a href = "${base}/admin/customer!findById.action?customerId=${customer.id}">编辑</a>
				                              	<a href = "javascript:;" onclick = "return tracking(${customer.id});">跟进</a>
				                              </td>
				                           </tr>
			                           </#list>
			                       </#if>
			                    </tbody>
			                 </table>
			              </div>
			              <!-- 我共享的客户结束 -->
                        </div>
                        
                        <div class="tab-pane fade" id="tab_1_2">
                           <!-- 共享给我的客户开始 -->
                           <div class="portlet-body">
			                 <table class="table table-striped table-bordered table-hover" id="customer_forme">
			                    <thead>
			                       <tr>
			                          <th style="width:8px;"><input type="checkbox" class="group-checkable" data-set="#customer .checkboxes" /></th>
			                          <th class="hidden-480">客户编号</th>
			                          <th class="hidden-480">简称</th>
			                          <th class="hidden-480">当前阶段</th>
			                          <th class="hidden-480">客户种类</th>
			                          <th class="hidden-480">所有人</th>
			                          <th class="hidden-480">行业</th>
			                          <th class="hidden-480">省份</th>
			                          <th class="hidden-480">城市</th>
			                          <th class="hidden-480">主要联系人</th>
			                          <th class="hidden-480">操作</th>
			                       </tr>
			                    </thead>
			                    <tbody>
			                       <#if forMeSharedCustomerList?exists>
			                        	<#list forMeSharedCustomerList as customer>
				                           <tr class="odd gradeX">
				                              <td><input type="checkbox" class="checkboxes" value="${customer.id}" /></td>
				                              <td class="hidden-480"><#if customer.no?exists>${customer.no}</#if></td>
				                              <td class="hidden-480"><#if customer.shortName?exists><a href = "${base}/admin/customer!findById.action?customerId=${customer.id}">${customer.shortName}</a></#if></td>
				                              <td class="hidden-480"><#if customer.currentStep?exists>${customer.currentStep}</#if></td>
				                              <td class="hidden-480"><#if customer.catagory?exists>${customer.catagory}</#if></td>
				                              <td class="hidden-480"><#if customer.proprietor?exists>${customer.proprietor}</#if></td>
				                              <td class="hidden-480"><#if customer.trade?exists>${customer.trade}</#if></td>
				                              <td class="hidden-480"><#if customer.province?exists>${customer.province}</#if></td>
				                              <td class="hidden-480"><#if customer.city?exists>${customer.city}</#if></td>
				                              <td class="hidden-480"><#if customer.lxr?exists><a href = "javascript:;" onclick = "return viewContacts(${customer.lxrId});">${customer.lxr}</a></#if></td>
				                              <td class="hidden-480">
				                              	<a href = "${base}/admin/customer!findById.action?customerId=${customer.id}">编辑</a>
				                              	<a href = "javascript:;" onclick = "return tracking(${customer.id});">跟进</a>
				                              </td>
				                           </tr>
			                           </#list>
			                       </#if>
			                    </tbody>
			                 </table>
			              </div>
			              <!-- 共享给我的客户结束 -->
                        </div>
                     </div>
                  </div>
               </div>
            </div>
         </div>
         <!-- END PAGE CONTENT-->
      </div>
      <!-- END PAGE -->
   </div>
   <!-- END CONTAINER -->
   <#include "footer.ftl">
   <!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
   <#include "coreJsPlugins.ftl">
   <!-- BEGIN PAGE LEVEL SCRIPTS -->
   <script src="${base}/assets/scripts/app.js"></script>
   <script src="${base}/resources/scripts/customer-managed.js"></script>
   <script src="${base}/resources/scripts/customer-list.js"></script>
   <script src="${base}/resources/scripts/tracking-validation.js"></script>
   <script>
      jQuery(document).ready(function(){
         App.init();
         CustomerManaged.init();
         TrackingValidation.init();
         
         if (jQuery().datepicker) {
            $('.date-picker').datepicker({
                rtl: App.isRTL(),
                autoclose: true
            });
            $('body').removeClass("modal-open"); // fix bug when inline picker is used in modal
        }
        
      });
     
     
   </script>
</body>
<!-- END BODY -->
</html>